package com.itstack.springframework.context.support;

/**
 * ClassName:
 * Description: TODO
 *
 * @author: Guo Shuai
 * @version: 1.0
 * @Date: 2021\11\25 0025
 */
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {

    private String[] confiturations;

    public ClassPathXmlApplicationContext() {
    }

    public ClassPathXmlApplicationContext(String confituration) {
        this(new String[]{confituration});
    }

    public ClassPathXmlApplicationContext(String[] confiturations) {
        for (int i = 0; i < confiturations.length; i++) {
            confiturations[i] = CLASSPATH_URL_PREFIX + confiturations[i];
        }
        this.confiturations = confiturations;
        refresh();
    }

    @Override
    protected String[] getConfigLocations() {
        return this.confiturations;
    }
}
